package com.kelvem.saas.workbanch.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum BusinessTemplateEnum {
    list("list", "列表模板"),
    list_add("list_add", "列表新增模板"),
    list_edit("list_edit", "列表编辑模板");

    private String code;
    private String name;
    
    public static String getNameByCode(String code){
        for(BusinessTemplateEnum typeEnum : BusinessTemplateEnum.values()){
            if(code.equals(typeEnum.code)){
                return typeEnum.name;
            }
        }
        return null;
    }
}
